import request from '@/utils/request'

export function save(data) {
  return request({
    url: 'api/company',
    method: 'post',
    data
  })
}

export function audit(data) {
  return request({
    url: 'api/company/audit',
    method: 'post',
    data
  })
}

export function add(data) {
  return request({
    url: 'api/company',
    method: 'post',
    data
  })
}

export function getCompany() {
  return request({
    url: 'api/company/hr',
    method: 'get'
  })
}

export function getCompanyList(params) {
  return request({
    url: 'api/company',
    method: 'get',
    params
  })
}

export function del(ids) {
  return request({
    url: 'api/company',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/company',
    method: 'put',
    data
  })
}

export default { save, add, edit, del, getCompany, audit, getCompanyList }
